﻿// Save this file as CRefTest.cs 
// Compile with: csc CRefTest.cs /doc:Results.xml  


using System;
using System.Security;

namespace IceDog.DNL.CSharp.Grammar.Comments
{
    /// <summary> 
    /// TestClass contains several cref examples. 
    /// </summary> 
    public class TestClass
    {
        /// <summary> 
        /// This sample shows how to specify the <see cref="TestClass"/> constructor as a cref attribute.
        /// </summary> 
        public TestClass()
        { }

        /// <summary> 
        /// This sample shows how to specify the <see cref="TestClass(int)"/> constructor as a cref attribute.
        /// the <paramref name="value"/> is ...
        /// </summary> 
        /// <param name="value">the value</param>
        /// <exception cref="System.Exception">Thrown when...</exception>
        /// <permission cref="SecurityRuleSet">Everyone can access this method.</permission>
        public TestClass(int value)
        { }
        /// <summary> 
        /// The GetZero method. 
        /// </summary> 
        /// <example>  
        /// This sample shows how to call the <see cref="GetZero"/> method.
        /// <code> 
        /// class TestClass  
        /// { 
        ///     static int Main()  
        ///     { 
        ///         return GetZero(); 
        ///     } 
        /// } 
        /// </code> 
        /// </example> 
        public static int GetZero()
        {
            return 0;
        }

        /// <summary> 
        /// The GetGenericValue method. 
        /// </summary> 
        /// <param name="para">params</param>
        /// <remarks>  
        /// This sample shows how to specify the <see cref="GetGenericValue{T}(T)"/> method as a cref attribute.
        /// </remarks> 
        /// <exception cref="ArgumentException">Thrown when...</exception>
        public static T GetGenericValue<T>(T para)
        {
            return para;
        }

        /// <summary>DoWork is a method in the TestClass class. 
        /// <para>Here's how you could make a second paragraph in a description. <see cref="System.Console.WriteLine(System.String)"/> for information about output statements.</para>
        /// <seealso cref="TestClass.Main"/>
        /// </summary> 
        public static void DoWork(int Int1)
        {

        }

        /// <summary> 
        /// Creates a new array of arbitrary type <typeparamref name="T"/>
        /// </summary> 
        /// <typeparam name="T">The element type of the array</typeparam>
        public static T[] MakeArray<T>(int n)
        {
            return new T[n];
        }

        private string _name;

        /// <summary>
        /// The Name property represents the employee's name.
        /// </summary> 
        /// <value>
        /// The Name property gets/sets the value of the string field, _name.
        /// </value> 
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }
    }

    /// <summary> 
    /// GenericClass. 
    /// </summary> 
    /// <remarks>  
    /// This example shows how to specify the <see cref="GenericClass{T}"/> type as a cref attribute.
    /// </remarks> 
    public class GenericClass<T>
    {
        // Fields and members.
    }

    // compile with: /doc:DocFileName.xml  

    /// <include file='xml_include_tag.doc' path='MyDocs/MyMembers[@name="test"]/*' />
    class Test
    {
        static void Run()
        {
        }
    }

    /// <include file='xml_include_tag.doc' path='MyDocs/MyMembers[@name="test2"]/*' />
    class Test2
    {
        public void Test()
        {
        }
    }
}
